package br.jm.mala.view;

import br.jm.mala.entity.User;
import java.io.Serializable;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

@Component("userSession")
@Scope("session")
public class UserSession implements Serializable {

    private static final long serialVersionUID = 8797025588249992683L;

    private User user;

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public boolean isLoggedIn() {
        return user != null;
    }
}
